<template>
  <div id="app">
      <cropper
      v-if="isShow"
      :img="img"
      :fixedNumber="[2,3]"
      :fixed="true"
      :autoCrop="true"
      :original="true"
      :centerBox="true"
      @bas64Data="bas64Data"
      @blobData="blobData"
      @clear="clear"
      ></cropper>
  </div>
</template>

<script>
export default {
  name: 'app',
    data() {
      return {
          isShow:true,
          img:'http://img0.imgtn.bdimg.com/it/u=1022109268,3759531978&fm=26&gp=0.jpg'
      }
    },
    methods:{
        bas64Data(data) {
            console.log(data);
        },
        blobData(data) {
            console.log(data);
        },
        clear() {
            this.isShow = false;
        }
    }
}
</script>

<style>
  *{
    margin: 0;
    padding: 0;
  }
</style>
